package com.zzw.thread;

public class StartDeadThread extends Thread {

	private int i;
	@Override
	public void run(){
		for(;i < 100;i++){
			System.out.println(getName() + "---" + i);
		}
	}
	
	public static void main(String[] args) {
		StartDeadThread sd = new StartDeadThread();
		for(int i = 0;i < 300;i++){
			System.out.println(Thread.currentThread().getName() + "---" + i);
			if(i == 20){
				sd.start();
				System.out.println(sd.isAlive());
			}
			if(!sd.isAlive()){
				sd.start();
			}
		}
	}
}